package com.wealth.scsj.b_app.view.activity.storesettingmodel;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.wealth.scsj.b_app.R;
import com.wealth.scsj.b_app.view.activity.BaseActivity;

/**
 *  店鋪电话设置  店铺公告设置 公用页面
 *  @author qxp
 *
 */
public class ShopCommonPageActivity extends BaseActivity implements View.OnClickListener{

    private TextView mTvTopTittle,mShopNoticeTextNumber;
    private RelativeLayout mShopNoticeRl;
    private EditText mShopNoticeEt,mSettingMobilePhoneEt;
    private Button mSaveBtn;
    int type=-1;

    @Override
    protected void createView(Bundle savedInstanceState) {
        setContentView(R.layout.activity_shop_common_page);
    }

    @Override
    protected void initView() {

        mTvTopTittle= findViewById(R.id.tv_top_tittle);
        mShopNoticeTextNumber =findViewById(R.id.shop_notice_text_number);

        mShopNoticeRl =findViewById(R.id.shop_notice_rl);

        mShopNoticeEt =findViewById(R.id.shop_notice_et);
        mSettingMobilePhoneEt =findViewById(R.id.setting_mobile_phone_et);

        mSaveBtn =findViewById(R.id.save_btn);

    }

    @Override
    protected void initListener() {

        mSaveBtn.setOnClickListener(this);
    }

    @Override
    protected void initData() {

        type =getIntent().getIntExtra("type",-1);
        // type ==1 为店铺公告，type==2 为店铺电话
        if(type==1){
            mSettingMobilePhoneEt.setVisibility(View.GONE);
            mShopNoticeRl.setVisibility(View.VISIBLE);
        }else if(type==2){
            mSettingMobilePhoneEt.setVisibility(View.VISIBLE);
            mShopNoticeRl.setVisibility(View.GONE);
        }
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.save_btn:


                break;
        }
    }
}
